//
//  NYLaunchManager.m
//  Nooryes
//
//  Created by uuu9 on 2017/6/2.
//  Copyright © 2017年 UUU9. All rights reserved.
//

#import "NYLaunchManager.h"
#import "NYLaunchAdvertisementModel.h"

@implementation NYLaunchManager

+(void)getLaunchAdvertisementWithCompletionHandle:(void (^)(NYLaunchAdvertisementModel *model, NSError *error))complete{
    [self GET:[NSString stringWithFormat:@"%@%@",Api_URL,kGetLaunchAdvert]
    parameters:nil
completionHandler:^(id responseObj, NSError *error) {
    [[NSUserDefaults standardUserDefaults] setObject:responseObj forKey:@"launchImage"];
    NYLaunchAdvertisementModel *model = [NYLaunchAdvertisementModel mj_objectWithKeyValues:responseObj];
    if (model.code != 0) {
        error = [self createError:model.msg];
    }
    complete(responseObj,error);
}];
}



//
//
//+(void)checkWithCompletionHandle:(void (^)(U9VersionModel *model, NSError *))complete{
//    [self POST:[NSString stringWithFormat:@"%@%@",Api_URL,kCheckVersion]
//    parameters:nil
//completionHandler:^(id responseObj, NSError *error) {
//    U9VersionModel *model = [U9VersionModel mj_objectWithKeyValues:responseObj];
//    if (model.error_code != 0) {
//        error = [self createError:model.error_msg];
//    }
//    complete(model,error);
//}];
//    
//}


@end
